import { apiPost } from '../func/fetch'
import type { PassDetail, PassManualRelease } from './type'
import type { CheckInList } from "@/api/checkInPassengerLibrary/type"

const _api = import.meta.env.VITE_FACEID_URL
// <-- 通行记录 -->
// 通行记录详情
export const passDetailApi = (params: { flightId: string, faceId: string }): Promise<PassDetail> => {
  return apiPost(`${_api}/pass/detail`, params)
}
// 人工放行
export const passManualReleaseApi = (params: PassManualRelease): Promise<any> => {
  return apiPost(`${_api}/pass/manualRelease`, params)
}
// 离开
export const passLeaveApi = (params: { faceId: string, flightId: string, remark?: string }): Promise<any> => {
  return apiPost(`${_api}/pass/leave`, params)
}
// 详情 
export const checkInDetailApi = (params: { faceId: string, flightId: string }): Promise<CheckInList> => {
  return apiPost(`${_api}/checkIn/detail`, params)
}
